L=1;
c=20;
m=.;
x=.;
maxN=20;
a=.3;
F[x_]:=Sin[π*x];
i=.;
A={};
For[i=1,i≤ maxN,i++,
A=Append[A,(2/L)Integrate[(Sin[(i*π*x)])*F[x],{x, 0, L}]] ];
G[x_,m_,t_]:=Sum[A[[n]]*Sin[(n*π*x/L)]*(Cos[(n*π*c*t)/L]), {n,1, m}]

Manipulate[Plot[G[x,m,t], {x,0,L}, PlotRange->{1, -1}], {m,1,maxN},{t,0,.4}]

Plot[(E^(-100(((x-a))^2))),{x,0,1}]

Piecewise[{{(E^(-(((x-a))^2))),.2<x<.4}}]

m=50
Plot3D[G[x,m,t], {x,0,L},{t,0,.1}, PlotRange->{1, -1}, PlotPoints->100]

(E^(-100(((x-a))^2)))